* server.el (server-switch-hook): New hook.
authorJim Blandy <jimb@redhat.com>
Tue, 18 May 1993 22:15:14 +0000 (22:15 +0000)
committerJim Blandy <jimb@redhat.com>
Tue, 18 May 1993 22:15:14 +0000 (22:15 +0000)
(server-process-filter): Call it.

lisp/server.el

index e81acbd21ac60fd8b87f24fed3412d5a9f3b1ed2..f1ab7eacdb0bc31cdd00e9f6012901211378af20 100644 (file)
@@ -77,6 +77,9 @@
   "*The program to use as the edit server")
 
 (defvar server-visit-hook nil
+  "*List of hooks to call when visiting a file for the Emacs server.")
+
+(defvar server-switch-hook nil
   "*List of hooks to call when switching to a buffer for the Emacs server.")
 
 (defvar server-process nil 
@@ -181,6 +184,7 @@ Prefix arg means just kill any existing server communications subprocess."
       ;; CLIENT is now a list (CLIENTNUM BUFFERS...)
       (setq server-clients (cons client server-clients))
       (switch-to-buffer (nth 1 client))
+      (run-hooks 'server-switch-hook)
       (message (substitute-command-keys
                "When done with a buffer, type \\[server-edit].")))))